<!DOCTYPE html>
<html>
<head>
#include("../../_common/head.html")
<title>参数列表</title>
</head>
<body class="pear-container">
    <div class="layui-panel query-panel /*查询面板*/">
        <form class="layui-form layui-row layui-col-space16" lay-filter="query-form" onsubmit="return false;">
        	<div class="layui-col-xl2 layui-col-lg2 layui-col-md2 layui-col-sm3 layui-col-xs6">
				<div class="layui-input-wrap">
					<div class="layui-input-prefix">
						<i class="pear-icon pear-icon-text"></i>
					</div>
					<input type="text" name="word" value="#(word??)" placeholder="模糊查询" autocomplete="off" class="layui-input" lay-affix="clear">
				</div>
		    </div>
        	<div class="layui-col-xl2 layui-col-lg2 layui-col-md2 layui-col-sm3 layui-col-xs6">
				<div class="layui-input-wrap">
                    <select name="type">
                        <option value="">-- 状态 --</option>
                    #DICTS(type="config_type")
                    #for(item : dicts)
                        <option value="#(item.value)"#if(type?? == item.value) selected#end>#(item.label)</option>
                    #end
                    </select>
                </div>
            </div>
            <div class="layui-col-xl2 layui-col-lg2 layui-col-md2 layui-col-sm3 layui-col-xs6">
                <div class="layui-btn-group">
                    <button type="button" class="layui-btn layui-btn-sm query-form-search">
                        <i class="layui-icon layui-icon-search"></i> 搜索
                    </button>
                    <button type="button" class="layui-btn layui-btn-sm layui-btn-primary query-form-reset">
                        <i class="layui-icon layui-icon-refresh"></i> 重置
                    </button>
                </div>
            </div>
        </form>
    </div>
    <div class="layui-panel data-panel /*数据面板*/">
        <table id="data-table" lay-filter="data-table"></table>
    </div>

#include("../../_common/data_table_template.html")


<!-- 依 赖 脚 本 -->
<script src="#CTX()/pear/component/layui/layui.js?_v=#VERSION()"></script>
<script src="#CTX()/pear/component/pear/pear.js?_v=#VERSION()"></script>
<script src="#CTX()/admin/js/youcan_ui.js?_v=#VERSION()"></script>

<script type="text/javascript">
var $ = layui.jquery;
/*
 * 模块操作路径
 */
var PATH = "#CTX()/admin/system/config/";

$(() => {
    var configs = {
        right: {
            //#authPermissions('system:config:add')
            add: true,
            //#end
            //#authPermissions('system:config:edit')
            edit: true,
            //#end
            //#authPermissions('system:config:del')
            remove: true,
            batchRemove: true,
            //#end
            //#authPermissions('system:config:query')
            detail: true,
            //#end
        },
        module: {
            name: "系统参数",
            path: PATH,
        }
    }

    // 二维表格的options
    var options = {
        url: PATH + "query",
            // 下面是Layui Table控件的参数
            initSort: {'field': 'type', 'type': 'asc'},
        toolbar: $.table.initTableToolbar(configs),
            cols: [[
            {type: 'checkbox', align: 'center', width: 60},
            {field: 'name', align: 'left', minWidth: 130, width: '10%', sort: true, title: '参数名'},
            {field: 'code', align: 'left', minWidth: 150, width: '14%', sort: true, title: '参数代码'},
            {field: 'value', align: 'left', minWidth: 150, width: '15%', sort: true, title: '参数值'},
            {field: 'type', align: 'center', width: 110, sort: true, title: '参数类型', templet: '#bean-configType'},
            {field: 'isSys', align: 'center', width: 110, sort: true, title: '系统类型', templet: '#bean-isSys'},
            {field: 'remark', align: 'left', minWidth: 150, width: '15%', title: '说明'},
            {field: 'createdDatetime', align: 'center', width: 160, sort: true, title: '创建时间', templet: '#bean-createdDatetime'},
            {align: 'left', minWidth: 160, title: '操作', templet: $.table.initRowToolbar(configs)}
        ]],
    };

    //console.log(options);

    /**
     * 初始化表格
     */
    $.table.init(configs, options);

});
</script>
</body>
</html>
